<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBannersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('banners', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 20)->comment('名称');
            $table->string('url')->comment('图片url');
            $table->tinyInteger('isglobal')->comment('是否全国使用');
            $table->integer('cityid')->comment('城市id');
            $table->string('type')->comment('跳转类型');
            $table->string('content',200)->comment('内容');
            $table->integer('sort')->default(0)->comment('排序');
            $table->date('starttime')->comment('开始时间');
            $table->date('lasttime')->comment('截止时间');
            $table->integer('islogin')->default(0)->comment('是否需要登录');
            $table->integer('status')->default(0)->comment('状态');
            $table->integer('adminid')->default(1)->comment('操作员');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('banners');
    }
}
